<template>
  <div id="m4heade">
    <div class="m4baar-1">
        <div class="m4bb">
          <router-link to="Fund"><img src="../assets/img/fanhuijiantou.png" alt=""></router-link>
            <p>优选基金</p>
        </div>
        <div class="m4card-11" id="m4baar-1" @click="information(item.fundNo)" v-for="(item ,index) in  a" :key="index" >
          <p class="m4www">{{item.yearRate}}</p>
                <p class="m4www1">近一年涨幅</p>
                <span class="m4www2">{{item.fundName}}</span>
                <span class="m4www4">{{item.fundNo}}</span>
                <span class="m4www3">短债策略 闲钱理财好选择</span>


        </div>
    </div>
  </div>
</template>

<script>


import  {optimization} from "../api/Transfer3"
import {Dialog} from 'vant';
export default {
  data(){
        return {
             a:[]   
        }
      },
      created(){
       this.aa()
      },
      methods:{
        information(query1){
            this.$router.push({
                name:"funddetails",
                query:{fundNo:query1}
            })
            console.log(query1);
        },
          aa(){
            optimization().then((res)=>{
                if(res.code==200){
                console.log(res.data);
                this.a=res.data
              }else{
                Dialog({title: '温馨提示', message: res.mag });
              }
              }).catch((err)=>{
               console.log(err);
              })
              
          }
      }
}
</script>

<style scoped src="../assets/css/tranfer-3.css" >

</style>